<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{{city}}天气信息</title>
  <style>
    html,body{
      height:100%;
      margin:0;
      color: white;
      text-align: center;
    }
    body{
      /*渐变色*/
      background: linear-gradient(#1078c7,#7196b4);
    }
    form{
      text-align: center;
    }
    main img{
      width: 80px;
    }
    h2{
      margin:5px;
    }
    footer{
      display: flex;
    }
    section{
      flex-grow: 1;
      border-right:1px solid greenyellow;
    }
    section:nth-child(3){
      border:none;
    }
  </style>
</head>
<body>
{% include 'header_one.html' %}
  <form action="/select/" method="POST">
    {% csrf_token %}
    <input name="city" type="text" placeholder="请输入城市">
    <button type="submit">查询</button>
  </form>
  <main>
    <h3>实时天气:{{ city }}</h3>
    <img src="/static/{{ list.0.text_night}}" alt="">
      <div>
          {{list.0.text_night}}
      </div>

   <h2>{{list.0.code_day}}℃（实时温度）</h2>
      <h3>{{list.0.high}}~{{ list.0.low }}℃</h3>
    <div>
      {{city}}<br>
      {{list.0.wind_direction}}<br>
    </div>
  </main>
  <footer>
    {% for i in list %}
      <section>
        <h5>{{i.date}}</h5>
        <img src="/static/{{ i.text_night}}" alt="">
        <div>
         {{i.high}}~{{ i.low }}℃<br>
          {{i.text_night}}<br>
          {{i.wind_direction}}<br>
        </div>
      </section>
    {% endfor %}
  </footer>
</body>
</html>